<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>AdminLTE 2 | Data Tables</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.7 -->
    <link rel="stylesheet" th:href="@{/adminLTE/bower_components/bootstrap/dist/css/bootstrap.min.css}">
    <!-- Font Awesome -->
    <link rel="stylesheet" th:href="@{/adminLTE/bower_components/font-awesome/css/font-awesome.min.css}">
    <!-- Ionicons -->
    <link rel="stylesheet" th:href="@{/adminLTE/bower_components/Ionicons/css/ionicons.min.css}">
    <!-- DataTables -->
    <link rel="stylesheet" th:href="@{/adminLTE/bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css}">
    <!-- Theme style -->
    <link rel="stylesheet" th:href="@{/adminLTE/dist/css/AdminLTE.min.css}">
    <!-- AdminLTE Skins. Choose a skin from the css/skins
         folder instead of downloading all of them to reduce the load. -->
    <link rel="stylesheet" th:href="@{/adminLTE/dist/css/skins/_all-skins.min.css}">
    <style>

    </style>




</head>
<body class="hold-transition skin-purple sidebar-mini">
<div class="wrapper">

    <header class="main-header">
        <!-- Logo -->
        <a class="logo">
            <!-- mini logo for sidebar mini 50x50 pixels -->
            <span class="logo-mini"><i class="fa fa-fw fa-cny"></i></span>
            <!-- logo for regular state and mobile devices -->
            <span class="logo-lg"><i class="fa fa-fw fa-cny"></i>标准地名地址信息管理系统</span>
        </a>
        <!-- Header Navbar: style can be found in header.less -->
        <nav class="navbar navbar-static-top">
            <!-- Sidebar toggle button-->
            <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </a>

            <div class="navbar-custom-menu">
                <ul class="nav navbar-nav">

                    <!-- User Account: style can be found in dropdown.less -->
                    <li class="dropdown user user-menu">
                        <a href="" class="dropdown-toggle" data-toggle="dropdown">
                            <img src="dist/img/user2-160x160.jpg" class="user-image" alt="User Image">
                            <span class="hidden-xs">Alexander Pierce</span>
                        </a>
                        <ul class="dropdown-menu">
                            <!-- User image -->
                            <li class="user-header">
                                <img src="dist/img/user2-160x160.jpg" class="img-circle" alt="User Image">

                                <p>
                                    Alexander Pierce - Web Developer
                                    <small>Member since Nov. 2012</small>
                                </p>
                            </li>
                            <!-- Menu Body -->
                            <li class="user-body">
                                <div class="row">
                                    <div class="col-xs-4 text-center">
                                        <a href="">Followers</a>
                                    </div>
                                    <div class="col-xs-4 text-center">
                                        <a href="">Sales</a>
                                    </div>
                                    <div class="col-xs-4 text-center">
                                        <a href="">Friends</a>
                                    </div>
                                </div>
                                <!-- /.row -->
                            </li>
                            <!-- Menu Footer-->
                            <li class="user-footer">
                                <div class="pull-left">
                                    <a href="" class="btn btn-default btn-flat">Profile</a>
                                </div>
                                <div class="pull-right">
                                    <a href="#" class="btn btn-default btn-flat">Sign out</a>
                                </div>
                            </li>
                        </ul>
                    </li>
                </ul>
            </div>
        </nav>
    </header>

    <!-- Left side column. contains the logo and sidebar -->
    <aside class="main-sidebar">
        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">
            <div class="user-panel">
                <div class="pull-left image">
                    <img th:src="@{dist/img/user2-160x160.jpg}" class="img-circle" alt="User Image">
                </div>
                <div class="pull-left info">
                    <p>Alexander Pierce</p>
                    <a th:href="@{#}"><i class="fa fa-circle text-success"></i> Online</a>
                </div>
            </div>

            <!-- sidebar menu: : style can be found in sidebar.less -->
            <ul class="sidebar-menu" data-widget="tree">
                <li class="treeview active">
                    <a th:href="@{#}">
                        <i class="fa fa-dashboard"></i> <span>门牌管理</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a th:href="@{javascript}"><i class="fa fa-circle-o"></i> 申请列表</a></li>
                        <li><a th:href="@{javascript}"><i class="fa fa-circle-o"></i> 用户信息</a></li>
                        <li><a th:href="@{javascript}"><i class="fa fa-circle-o"></i> 审批管理</a></li>
                    </ul>
                </li>

                <li class="treeview">
                    <a th:href="@{#}">
                        <i class="fa fa-dashboard"></i> <span>用户管理</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a th:href="@{javascript}"><i class="fa fa-circle-o"></i> 用户管理</a></li>
                        <li><a th:href="@{javascript}"><i class="fa fa-circle-o"></i> 角色管理</a></li>
                        <li><a th:href="@{javascript}"><i class="fa fa-circle-o"></i> 权限管理</a></li>
                    </ul>
                </li>

                <li class="treeview">
                    <a th:href="@{#}">
                        <i class="fa fa-dashboard"></i> <span>地图管理</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a th:href="@{javascript}"><i class="fa fa-circle-o"></i>地图查询</a></li>
                    </ul>
                </li>

                <li class="treeview">
                    <a th:href="@{/region/toDist}">
                        <i class="fa fa-dashboard"></i> <span>行政区划管理</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                </li>

                <li class="treeview">
                    <a th:href="@{#}">
                        <i class="fa fa-dashboard"></i> <span>城区道路管理</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                </li>

                <li class="treeview">
                    <a th:href="@{#}">
                        <i class="fa fa-dashboard"></i> <span>街道管理</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                </li>

                <li class="treeview">
                    <a th:href="@{#}">
                        <i class="fa fa-dashboard"></i> <span>帮助信息</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                </li>

                <li class="treeview">
                    <a th:href="@{#}">
                        <i class="fa fa-dashboard"></i> <span>系统设置</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                </li>

            </ul>
        </section>
        <!-- /.sidebar -->
    </aside>

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <div class="row">
                <div class="1">
                </div>
                <div class="col-md-11">
                    <a th:href="@{user_login.html}"><button class="btn btn-info btn-sm btn-flat">登录</button></a>
                    <a th:href="@{user_register.html}"><button class="btn btn-info btn-sm btn-flat">注册</button></a>
                </div>

            </div>

        </section>

        <!-- Main content -->
        <section class="content">

            <div class="box">
                <div class="box-header">
                    <h3 class="box-title">行政区表</h3>
                </div>
                <!-- /.box-header -->
                <div class="box-body">
                    <div class="dataTables_wrapper form-inline dt-bootstrap" id="example2_wrapper">
                        <div class="row">
                            <div class="col-sm-6">
                                <a th:href="@{/region/add}">
                                    <button class="btn btn-danger  btn-xs btn-flat" type="submit">添加</button>
                                </a>

                            </div>
                            <div class="col-sm-6"></div>
                        </div>
                        <div class="row">
                            <div class="col-sm-12">
                                <table class="table table-bordered table-hover dataTable" id="example2" role="grid"
                                       aria-describedby="example2_info">
                                    <thead>
                                    <tr role="row">
                                        <th tabindex="0" class="sorting_asc" aria-controls="example2"
                                            aria-label="Rendering engine: activate to sort column descending"
                                            aria-sort="ascending" rowspan="1" colspan="1">行政区ID
                                        </th>
                                        <th tabindex="0" class="sorting" aria-controls="example2"
                                            aria-label="Browser: activate to sort column ascending" rowspan="1"
                                            colspan="1">行政区名称
                                        </th>
                                        <th tabindex="0" class="sorting" aria-controls="example2"
                                            aria-label="Platform(s): activate to sort column ascending" rowspan="1"
                                            colspan="1">行政邮编
                                        </th>

                                    </tr>
                                    </thead>
                                    <tbody>

                                    <tr th:each="region:${regions}">
                                        <!--/*@thymesVar id="region" type=""*/-->
                                        <td th:text="${region.id}"></td>
                                        <td th:text="${region.name}"></td>
                                        <td th:text="${region.zip}"></td>
                                        <td>
                                            <a th:href="@{'/region/edit?id=' + ${region.id}}"><button class="btn btn-warning btn-xs btn-flat">修改</button></a>
                                      <a th:href="@{'/region/delete?id=' +${region.id}}">
                                          <button class="btn btn-danger  btn-xs btn-flat" type="submit">删除</button>
                                      </a>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                            <div class="col-sm-5">
                                <div class="dataTables_info" id="example2_info" role="status" aria-live="polite"></div>
                            </div>
                            <div class="col-sm-7">
                                <div class="dataTables_paginate paging_simple_numbers" id="example2_paginate">
                                    <ul class="pagination">
                                        <li class="paginate_button previous disabled" id="example2_previous"><a
                                                tabindex="0" aria-controls="example2" th:href="@{#}"
                                                data-dt-idx="0">Previous</a></li>
                                        <li class="paginate_button active"><a tabindex="0" aria-controls="example2"
                                                                              th:href="@{#}" data-dt-idx="1">1</a></li>
                                        <li class="paginate_button "><a tabindex="0" aria-controls="example2" th:href="@{#}"
                                                                        data-dt-idx="2">2</a></li>
                                        <li class="paginate_button "><a tabindex="0" aria-controls="example2" th:href="@{#}"
                                                                        data-dt-idx="3">3</a></li>
                                        <li class="paginate_button "><a tabindex="0" aria-controls="example2" th:href="@{#}"
                                                                        data-dt-idx="4">4</a></li>
                                        <li class="paginate_button "><a tabindex="0" aria-controls="example2" th:href="@{#}"
                                                                        data-dt-idx="5">5</a></li>
                                        <li class="paginate_button "><a tabindex="0" aria-controls="example2" th:href="@{#}"
                                                                        data-dt-idx="6">6</a></li>
                                        <li class="paginate_button next" id="example2_next"><a tabindex="0"
                                                                                               aria-controls="example2"
                                                                                               th:href="@{#}" data-dt-idx="7">Next</a>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- /.box-body -->
            </div>


        </section>
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->


</div>
<script>
    $(function () {
        $("#exportRegionInfo").click(
           function () {window.location.href="${pageContext.request.contextPath}/exportRegionInfo.action";

           }
        )
    });
</script>
<script>
    $(function () {
        $('#example2').DataTable({
            "language": {
                "lengthMenu": "每页 _MENU_ 条记录",
                "zeroRecords": "没有找到记录",
                "info": "第 _PAGE_ 页 ( 总共 _PAGES_ 页 )",
                "infoEmpty": "无记录",
                "infoFiltered": "(从 _MAX_ 条记录过滤)",
                "search":"快速检索: ",
                "oPaginate": {
                    "sPrevious": "上页",
                    "sNext": "下页"
                }
            }

        })

    })
</script>
<!-- ./wrapper -->

<!-- jQuery 3 -->
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap 3.3.7 -->
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- DataTables -->
<script src="bower_components/datatables.net/js/jquery.dataTables.min.js"></script>
<script src="bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
<!-- SlimScroll -->
<script src="bower_components/jquery-slimscroll/jquery.slimscroll.min.js"></script>
<!-- FastClick -->
<script src="bower_components/fastclick/lib/fastclick.js"></script>
<!-- AdminLTE App -->
<script src="dist/js/adminlte.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="dist/js/demo.js"></script>
</body>

</html>
